home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_09_03
/
9n03038a
< prev
next >
Wrap
Text File
|
1991-01-20
|
935b
|
44 lines
/******************************************************
* NAME: message_in
*
* DESCRIPTION: Text ........
******************************************************/
#include "que.h"
extern struct g_queue in_que;
void message_in()
{
unsigned char new_msg,temp;
int i, state;
while (true)
{
new_msg = true;
i = 1;
state = 0;
/* now look at each character if the character is a DLE then the
the next character is ingored */
while (new_msg)
{
temp = remove_one(&in_que);
/*
* implement a state machine to
* format the incoming message
* to a form suitable for your application
*/
}
/*
* calculate the crc
*/
/* determine the address */
/*
* determine the type of message
* and send a reply
*/
}
}